#include "component/window.h"
#include "utils/WindowControl.h"

Window::Window(QWidget *parent) : QMainWindow(parent) {
    resize(1200, 740);
    setWindowFlags(Qt::FramelessWindowHint);

    framelesshelperInit();
}

Window::~Window() {}

void Window::framelesshelperInit() {
    // this指的是要处理的窗体
    WindowControl *control = new WindowControl(this);
    control->activeWindow(this);          //激活当前窗体
    control->setWindowMove(true);         //设置窗体可移动
    control->setWindowResize(true);       //设置窗体可缩放
    control->setRubberBandOnMove(true);   //设置橡皮筋效果-可移动
    control->setRubberBandOnResize(true); //设置橡皮筋效果-可缩放
}

void Window::setIsWindowMax(bool value) {
    isWindowMax = value;
}

bool Window::getIsWindowMax() {
    return isWindowMax;
}
